﻿using System.Collections.Generic;

namespace Nx.Azure.Extensions
{
    public static class WorkerEntryPointExtensions
    {
        public static IList<WorkerEntryPoint> Add<TWorker>(this IList<WorkerEntryPoint> list, uint count)
            where TWorker : WorkerEntryPoint, new()
        {
            for (uint i = 0; i < count; i++)
            {
                list.Add(new TWorker());
            }

            return list;
        }
    }
}
